Skip to content

fix(proxy): stop advertising HTTP/3 and enable Caddy access logs - #175

Merged
bitbacchus merged 1 commit into
mainfrom
fix/disable-http3-alt-svc
Sep 1, 2026
Merged

fix(proxy): stop advertising HTTP/3 and enable Caddy access logs#175
bitbacchus merged 1 commit into
mainfrom
fix/disable-http3-alt-svc

Conversation

@bitbacchus

Copy link
Copy Markdown
Member

Caddy enables HTTP/3 by default and adds Alt-Svc: h3=":443"; ma=2592000 to every response, but the stack never made QUIC reachable: a compose port mapping written as "443:443" publishes TCP only, so UDP 443 was never forwarded to the container. The advertisement was therefore always false, regardless of how the host firewall is configured.

Clients that act on it cache the alternative for up to 30 days and prefer HTTP/3 on subsequent navigations. With nothing listening, the QUIC handshake hangs until it times out and the browser shows a blank page. Reloading does not help, because the cached entry survives it; only clearing site data or disabling HTTP/3 in the browser restores access. The failure leaves no trace server-side, since no connection is ever established.

Verified on a running deployment: responses carried the Alt-Svc header over HTTP/2 while a QUIC handshake to the same host timed out after 10s with no reply, and controls against public HTTP/3 endpoints completed in under 0.1s. Chromium forced onto QUIC for the origin failed with ERR_QUIC_PROTOCOL_ERROR; the same binary without the flag loaded the app normally.

Disabling HTTP/3 rather than publishing 443/udp: browsers do not run the WebSocket API over HTTP/3, so the actor traffic that carries a live quiz stays on TCP either way and HTTP/3 would only affect the initial bundle load. The alternative would require the port publish and the operator's firewall to agree on every deployment, and this stack is shipped to self-hosters whose firewalls we do not control, leaving the advertisement in place would hand each of them the same latent outage.

Also enables the site access log. Client
IPs are filtered out: the diagnostic value is whether a request arrived at all, and that needs no personal data. Output goes to stderr, so docker compose logs caddy picks it up; the caddy service gains the same 20m/10-file json-file cap the backend and database already use.

Caddy enables HTTP/3 by default and adds `Alt-Svc: h3=":443"; ma=2592000` to
every response, but the stack never made QUIC reachable: a compose port
mapping written as "443:443" publishes TCP only, so UDP 443 was never
forwarded to the container. The advertisement was therefore always false,
regardless of how the host firewall is configured.

Clients that act on it cache the alternative for up to 30 days and prefer
HTTP/3 on subsequent navigations. With nothing listening, the QUIC handshake
hangs until it times out and the browser shows a blank page. Reloading does
not help, because the cached entry survives it; only clearing site data or
disabling HTTP/3 in the browser restores access. The failure leaves no trace
server-side, since no connection is ever established.

Verified on a running deployment: responses carried the Alt-Svc header over
HTTP/2 while a QUIC handshake to the same host timed out after 10s with no
reply, and controls against public HTTP/3 endpoints completed in under 0.1s.
Chromium forced onto QUIC for the origin failed with ERR_QUIC_PROTOCOL_ERROR;
the same binary without the flag loaded the app normally.

Disabling HTTP/3 rather than publishing 443/udp: browsers do not run the
WebSocket API over HTTP/3, so the actor traffic that carries a live quiz stays
on TCP either way and HTTP/3 would only affect the initial bundle load. The
alternative would require the port publish and the operator's firewall to
agree on every deployment, and this stack is shipped to self-hosters whose
firewalls we do not control, leaving the advertisement in place would hand
each of them the same latent outage.

Also enables the site access log. Client
IPs are filtered out: the diagnostic value is whether a request arrived at
all, and that needs no personal data. Output goes to stderr, so
`docker compose logs caddy` picks it up; the caddy service gains the same
20m/10-file json-file cap the backend and database already use.
@bitbacchus
bitbacchus merged commit 77fc14c into main Sep 1, 2026
5 checks passed
@bitbacchus
bitbacchus deleted the fix/disable-http3-alt-svc branch September 1, 2026 21:51
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant